public class Sphere extends ObjectVolume {
    double a;
    double b;
    double c;
    double h;

    Sphere(double a, double b, double c, double h) {
        this.a =a;
        this.b =b;
        this.c =c;
        this.h =h;
    }
    double getArea(){
        double p = (a+b+c)/2;
        return (a+b+c)*h+ Math.sqrt(p*(p-a)*(p-b)*(p-c))*2;
    }

    double getVolume() {
        double p = (a+b+c)/2;
        return Math.sqrt(p*(p-a)*(p-b)*(p-c))*h;
    }
}